import { Controller, Post } from '@nestjs/common';
import { NavConfigService } from "./nav-config.service";
import { ApiBasicAuth, ApiExtraModels, ApiOperation, ApiTags } from "@nestjs/swagger";
import { ApiResult } from 'src/decorators/api-result.decorator';
import { NavConfigEntity } from './nav-config.entity';
import { ResultVo } from 'src/vo/common/result.vo';

@ApiExtraModels(NavConfigEntity, ResultVo)
@Controller('navConfig')
@ApiTags('轮播图管理')
@ApiBasicAuth("token")
export class NavConfigController {
    constructor(private readonly navConfigService: NavConfigService) { }

    @Post("queryAll")
    @ApiResult(NavConfigEntity, true)
    @ApiOperation({ summary: '查询轮播图列表' })
    async queryAll() {
        return await this.navConfigService.queryAll();
    }
}
